package com.ktwlsoft.archivemanage.domain.business.repositoryService;

import com.ktwlsoft.archivemanage.domain.dao.entity.MenuSource;
import com.ktwlsoft.archivemanage.domain.dao.repository.IMenuSourceMapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MenuSourceRepositoryService {

    private final IMenuSourceMapper menuSourceMapper;

    public MenuSourceRepositoryService(IMenuSourceMapper menuSourceMapper) {
        this.menuSourceMapper = menuSourceMapper;
    }

    public List<MenuSource> findByRoleId(Long roleId) {
        return menuSourceMapper.findByRoleId(roleId);
    }

    public List<MenuSource> findByUserName(String userName){
        return menuSourceMapper.findByUserName(userName);
    }

    public List<MenuSource> findAllMenu() {
        return menuSourceMapper.findAllMenu();
    }
}
